package com.sxpi.zixun.vo;

import com.sxpi.zixun.valid.annotation.ValidPassword;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.pug.generator.anno.PugDoc;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @Author: 董伟豪
 * @Date: 2022/8/24 21:20
 * NotNull 判断一个对象是否为空
 * NotBlank 判断空字符
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
// @PasswordMatches
public class AdminUserRegVo implements java.io.Serializable{

    @PugDoc(name="注解")
    private Long id;

    @PugDoc(name="姓名")
    @NotBlank// 仅仅只是字符串不为空
    @Size(min = 1,max = 20,message = "{AdminUserRegVo.username}")
    private String username;

    @PugDoc(name="密码")
    @NotBlank(message = "{AdminUserRegVo.NotBlank.password.message}")
    private String password;

    @PugDoc(name="账号")
    @NotBlank(message = "{AdminUserRegVo.NotBlank.account.message}")
    private String account;

    @PugDoc(name="头像")
    @NotBlank
    private String avatar;

    @PugDoc(name="发布状态 0 未发(离职) 1已发布(入职)")
    private Integer status;

    @PugDoc(name="删除状态 0 未删除  1 删除")
    private Integer isdelete;

    @PugDoc(name="角色ID")
    @NotNull
    private Long roleId;

/*
    @PugDoc(name="确认密码")
    @NotBlank
    @ValidPassword
    private String confirmPassword;*/

/*
    @PugDoc(name="手机")
    @Phone
    private String phone;*/
}
